package com.vm.activity;

import java.util.ArrayList;
import java.util.List;

import com.vm.adapter.SoftImageAdapter;
import com.vm.model.Scene;
import com.vm.model.Soft;
import com.vm.widget.SoftDetailGallery;
import com.wwtscapp.apk.R;

import android.app.Activity;
import android.os.Bundle;
import android.os.Handler;

public class ImageShower extends Activity {
	public SoftDetailGallery iv_pic;
	Soft soft;
	public boolean timeFlag = true;
	private List<Scene> list;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.imageshower);
		iv_pic = (SoftDetailGallery) findViewById(R.id.iv_pic);
		iv_pic.setImageActivity(this);
		Object object = getIntent().getSerializableExtra("soft");
		if (object != null) {
			soft = (Soft) object;
			list = new ArrayList<Scene>();
			list = soft.getSceneList();
			SoftImageAdapter myAdapter = new SoftImageAdapter(ImageShower.this,
					list);
			iv_pic.setAdapter(myAdapter);
		}
		final ImageLoadingDialog dialog = new ImageLoadingDialog(this);
		dialog.setCanceledOnTouchOutside(false);
		dialog.show();
		new Handler().postDelayed(new Runnable() {
			@Override
			public void run() {
				dialog.dismiss();
			}
		}, 200 * 2);
	}

	@Override
	public void onBackPressed() {
		super.onBackPressed();
	}

}
